<!-- 首页轮播 -->
<template>
    <div class="homeswiper">
        <swiper-view :slider="bannerlist"></swiper-view>
    </div>
</template>

<script>
import SwiperView from '../utils/SwiperView.vue'
import { getBanner } from '@/utils/api/homeapi'
export default {
    components: { SwiperView },
    data(){
        return{
            bannerlist:[]
        }
    },
    mounted(){
        this.setBannerList()
    },
    methods:{
        async setBannerList(){
            let res=await getBanner()
            // console.log(res);
            this.bannerlist=res.result
        },
    }
}
</script>

<style lang="scss">
.homeswiper{
    width: 100%;
    height: 500px;
    position: absolute;
    left: 0;
    top: 0;
}
.homeswiper .prev{
    left: 270px !important;
}
.homeswiper .carousel-indicator{
    padding-left: 350px !important;
}
</style>